# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Thore Bödecker <foxxx0@archlinux.org>
# Contributor: Matmas <matmas@matmas.net>
# Contributor: Thomas Gubler <thomasgubler@gmail.com>
# Contributor: Daniel YC Lin <dlin.tw at gmail>
# Contributor: Florian Bruhin <archlinux.org@the-compiler.org>

pkgname=python-websocket-client
pkgver=1.6.4
pkgrel=1
pkgdesc="WebSocket client library for Python"
arch=('any')
url="https://github.com/websocket-client/websocket-client"
license=('LGPL')
depends=('python')
makedepends=('python-setuptools')
checkdepends=('python-pytest')
source=("https://pypi.io/packages/source/w/websocket-client/websocket-client-$pkgver.tar.gz")
sha512sums=('d5a44c78bf5f6d4b5a1344bf6d5c94435e529dd85ee5d7fe5552478bbf2e57229ca7573b28a93fa28d1e5cf72fd721b4456bb5e154db578ec652cbc82316413b')

build() {
  cd websocket-client-$pkgver
  python setup.py build
}

check() {
  cd websocket-client-$pkgver
  pytest
}

package() {
  cd websocket-client-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}

# vim:set ts=2 sw=2 ft=sh et:
